package People;

class Person{
    private String name;
    private int age;

    public void setName(String n){
        name = n;
    }
    public String getName(){
        return  name;
    }
    public void setAge(int a){
        age = a;
    }
    public int getAge(){
        return age;
    }
    void talk(){
        System.out.println("我是: "+name+", 今年: "+age+"岁");
    }

}
public class People {
    public static void main(String[] args) {
        Person p = new Person();
        p.setName("张三");
        p.setAge(18);
        p.talk();
    }
}
